import request from "../utils/request";

export const insertLikeService = (topic,likeId) => {
    const params = new URLSearchParams()
    params.append('topic', topic)
    params.append('likeId', likeId)
    return request.post("/like/insertLike", params)
}

export const isLikeService = (topic,likeId) => {
    // const params = new URLSearchParams()
    // params.append('topic', topic)
    // console.log(likeId)
    // params.append('likeId', likeId)
    const params={'topic':topic,'likeId':likeId}
    return request.get("/like/isLike",{params:params})
}

export const deleteLikeService = (topic,likeId) => {
    const params = new URLSearchParams()
    params.append('topic', topic)
    params.append('likeId', likeId)
    return request.put("/like/deleteLike", params)
}
